<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %> 
<!DOCTYPE HTML>
<html lang="zh-CN">
<head>
	<meta charset="UTF-8">
	<title>凯盛项目管理系统</title>
	<link rel="stylesheet" type="text/css" href="../css/bootstrap.min.css" />
	<script type="text/javascript" src="../js/jquery.min.js"></script>
</head>
	<body class="body">
		
		<div class="navbar navbar-fixed-top">
			<div class="navbar-inner">
				<div class="container">
					<a class="brand" href="#">Kaishengit PMS</a>
				</div>
			</div>
		</div>
		
		
		<div class="container">
		  <div class="row">
			<div class="span3">
				<div style="padding: 8px 0;" class="well">
					<ul class="nav nav-list">
					  <li class="nav-header">新Apple总部项目</li>
					  <li class="divider"></li>
					  <li><a href="#"><i class="icon-home"></i>最新动态</a></li>
					  <li>
						<a href="#"><i class="icon-flag"></i>目标</a>
					  </li>
					  <li class="active"><a href="#"><i class="icon-white icon-folder-open"></i>资料库</a></li>
					  <li><a href="#"><i class="icon-file"></i>文件共享</a></li>
					  <li><a href="#"><i class="icon-user"></i>联系人</a></li>
					  <li><a href="#"><i class="icon-fire"></i>想法</a></li>
					  <li><a href="#"><i class="icon-warning-sign"></i>Bug</a></li>
					  <li><a href="#"><i class="icon-cog"></i>项目设置</a></li>
					</ul>
				</div>
			</div>
			<div class="span9">
				<ul class="breadcrumb" style="margin-bottom:0px;border-radius: 3px 3px 0 0;margin-top:15px">
					<li class="active">
						<a href="#"><i class="icon-folder-open"></i>资料</a>
					</li>
					<li class="pull-right"><i class="icon-plus"></i><a href="new_document.jspx" class="link-black">分享新资料</a></li>
				</ul>
				<div class="wall" style="margin-bottom:20px;">
					<c:forEach var="list" items="${requestScope.documentList.list}">
						<blockquote>
						  <h4><a href="document_show.html">${list.title}</a></h4>
						  <p style="font-size:14px;line-height:1.5;">${list.content}</p>
						  <small>${list.employee.name} <p class="timeago" title="${list.createtime}"></p></small>
						  <a href="docedit.jspx?id=${list.id}" title="编辑"><i class="icon-pencil"></i></a>
						  <a href="javascript:;" class="del_link" rel="${list.id }" title="删除"><i class="icon-trash"></i></a>
						</blockquote>
					</c:forEach>
						
							<div class="pagination pull-right">
							  <ul>
							  	<c:choose>
							  		<c:when test="${requestScope.documentList.totalPages == 1 }">
							  			<li class="disabled"><a href="#">Prev</a></li>
										<li class="disabled"><a href="#">1</a></li>
							  			<li class="disabled"><a href="#">Next</a></li>
							  		</c:when>
							  		<c:otherwise>
							  			<li><a href="document.jspx?p=1">Prev</a></li>
							  			<c:forEach var="pageList" items="${requestScope.documentList.slider }" begin="0" end="4">
											<li><a href="document.jspx?p=${pageList}">${pageList}</a></li>
										</c:forEach>
										<li><a href="document.jspx?p=${requestScope.documentList.totalPages}">Next</a></li>	
							  		</c:otherwise>
										
								</c:choose>	
							  </ul>
							</div>
							
					
					<div class="clear"></div>
				</div>
			</div>
		  </div>
		</div>
	</body>
	<script type="text/javascript" src="../js/jquery.min.js"></script>
	<script type="text/javascript" src="../js/timeago.js"></script>
	<script type="text/javascript">
		$(document).ready(function(){
			$(".timeago").timeago();
			$(".del_link").click(function(){
				if(confirm("确定要删除该记录吗？")) {
					location.href="docdel.jspx?id="+$(this).attr("rel");
				}
			});
		});
	
	
	</script>
</html>
